home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / init.d / procps < prev    next >
Encoding:
Text File  |  2010-01-31  |  1.3 KB  |  59 lines

  1. #! /bin/sh
  2. # /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
  3. #
  4. # written by Elrond <Elrond@Wunder-Nett.org>
  5.  
  6. ### BEGIN INIT INFO
  7. # Provides:          procps
  8. # Required-Start:    mountkernfs $local_fs
  9. # Required-Stop:
  10. # Should-Start:      udev module-init-tools
  11. # Default-Start:     S
  12. # Default-Stop:
  13. # Short-Description: Configure kernel parameters at boottime
  14. # Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
  15. ### END INIT INFO
  16.  
  17. PATH=/sbin:/bin
  18.  
  19. SYSCTL=/sbin/sysctl
  20.  
  21. test -x $SYSCTL || exit 0
  22.  
  23. . /lib/lsb/init-functions
  24.  
  25. # Comment this out for sysctl to print every item changed
  26. QUIET_SYSCTL="-q"
  27.  
  28. # Check for existance of the default file and exit if not there,
  29. # Closes #52839 for the boot-floppy people
  30. if [ -f /etc/default/rcS ] ; then
  31.   . /etc/default/rcS
  32. fi
  33.  
  34. set -e
  35.  
  36. case "$1" in
  37.     start|restart|force-reload)
  38.         log_action_begin_msg "Setting kernel variables "
  39.         STATUS=0
  40.         for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
  41.             if [ -r "$file" ] ; then
  42.                 if [ "$VERBOSE" = "yes" ] ; then
  43.                     log_action_cont_msg " $file"
  44.                 fi
  45.                 $SYSCTL $QUIET_SYSCTL -p "$file" || STATUS=$?
  46.             fi
  47.         done
  48.         log_action_end_msg $STATUS
  49.         ;;
  50.     stop)
  51.         ;;
  52.     *)
  53.         echo "Usage: /etc/init.d/procps {start|stop|restart|force-reload}" >&2
  54.         exit 3
  55.         ;;
  56. esac
  57.  
  58. exit 0
  59.